<?php
namespace app\api\controller\wdsxh;
use app\common\controller\Api;
use app\admin\model\wdsxh\Tabbar as Model;
/**
 * 底部导航接口
 */
class Tabbar extends Base
{
    protected $noNeedLogin = ['*'];
    protected $noNeedRight = ['*'];

    public function index(){
        $list=Model::where('status',1)
            ->order('weigh desc')
            ->field('id,name,path,icon,selicon')
            ->select();
        if($list){
            foreach ($list as $row){
                $row->icon=wdsxh_full_url($row->icon);
                $row->selicon=wdsxh_full_url($row->selicon);
            }
        }
        $this->success($list);
    }
}